package com.xzq.erp.domain.po;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author xzq
 * @since 2025-05-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_product")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品名称
     */
    @TableField("name")
    private String name;

    /**
     * 分类ID
     */
    @TableField("category_id")
    private Long categoryId;

    /**
     * 品牌ID
     */
    @TableField("brand_id")
    private Long brandId;

    /**
     * 供应商ID
     */
    @TableField("supplier_id")
    private Long supplierId;

    /**
     * 计量单位ID
     */
    @TableField("unit_id")
    private Long unitId;

    /**
     * 产地ID
     */
    @TableField("origin_id")
    private Long originId;

    /**
     * 颜色
     */
    @TableField("color")
    private String color;

    /**
     * 商品主图
     */
    @TableField("image")
    private String image;

    /**
     * 商品相册(JSON数组)
     */
    @TableField("album")
    private String album;

    /**
     * 进价
     */
    @TableField("purchase_price")
    private BigDecimal purchasePrice;

    /**
     * 售价
     */
    @TableField("selling_price")
    private BigDecimal sellingPrice;

    /**
     * 会员价
     */
    @TableField("member_price")
    private BigDecimal memberPrice;

    /**
     * 库存数量
     */
    @TableField("stock")
    private Integer stock;

    /**
     * 商品描述
     */
    @TableField("description")
    private String description;

    /**
     * 生产日期
     */
    @TableField("production_date")
    private LocalDate productionDate;

    /**
     * 保质期
     */
    @TableField("shelf_life")
    private LocalDate shelfLife;

    /**
     * 状态(0:下架 1:上架)
     */
    @TableField("status")
    private Boolean status;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @TableField("is_deleted")
    private Boolean isDeleted;


}
